package com.example.hadoop.mapreduce.dbscan;

import com.example.hadoop.others.Helper;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URISyntaxException;

public class Test {
    public static void main(String[] args) throws InterruptedException, IOException, URISyntaxException {
        Configuration conf = Helper.getConfiguration();
        FileSystem fs = Helper.getFileSystem();
        FSDataInputStream inputStream = fs.open(new Path("/cluster/data.txt"));
        BufferedReader bufferedInputStream = new BufferedReader(new InputStreamReader(inputStream));
        String line = null;
        while ((line= bufferedInputStream.readLine()) != null) {
            System.out.println(line);
        }
    }
}
